import request from '@/utils/request'

/* ---------------------------------------------------------------------------------- 销售订单分析  */

// 销售订单分析 -当天,本周,本月,本年
export function salesOrderAnalysisApi() {
  return request({
    url: '/salesOrderAnalysis'
  })
}

//本期,同期
export function salesOrderAnalysisubApi() {
  return request({
    url: '/salesOrderAnalysisub'
  })
}

/* ---------------------------------------------------------------------------------- 销售出库分析  */

// 销售订单分析 -当天,本周,本月,本年
export function saleSaleOutStorageApi() {
  return request({
    url: '/saleOutStorage'
  })
}

//本期,同期
export function salesSaleOutStoragesubApi() {
  return request({
    url: '/saleOutStoragesub'
  })
}

/* ---------------------------------------------------------------------------------- 销售出货分析(退货)  */

// 销售订单分析 -当天,本周,本月,本年
export function saleSalesReturnApi() {
  return request({
    url: '/salesReturn'
  })
}

//本期,同期
export function salesSalesReturnsubApi() {
  return request({
    url: '/salesReturnsub'
  })
}

/* ---------------------------------------------------------------------------------- 客户交易排行  */

export function customerTransactionRankingApi(params) {
  return request({
    url: '/customerTransactionRanking',
    params
  })
}

/* ---------------------------------------------------------------------------------- 销售地区分析表（省）  */

export function regionalAnalysisApi(params) {
  return request({
    url: '/regionalAnalysis',
    params
  })
}

/* ---------------------------------------------------------------------------------- 客户交易分析表  */

export function customerTransactionApi(params) {
  return request({
    url: '/customerTransaction',
    params
  })
}

/* ---------------------------------------------------------------------------------- 客户交易分析表(退货)  */

export function salesReturnAnalysisApi(params) {
  return request({
    url: '/salesReturnAnalysis',
    params
  })
}

/* ---------------------------------------------------------------------------------- 客户销售明细分析  */

export function customerSalesBreakdownAnalysisSheetApi(params) {
  return request({
    url: '/customerSalesBreakdownAnalysisSheet',
    params
  })
}

/* ---------------------------------------------------------------------------------- 客户类别交易分析  */

export function customerCategoryAnalysisApi(params) {
  return request({
    url: '/customerCategoryAnalysis',
    params
  })
}

/* ---------------------------------------------------------------------------------- 业务销售分析表  */

export function businessSalesAnalysisApi(params) {
  return request({
    url: '/businessSalesAnalysis',
    params
  })
}

/* ---------------------------------------------------------------------------------- 业务销售分析表(退货)  */

export function businessSalesReturnsAnalysisApi(params) {
  return request({
    url: '/businessSalesReturnsAnalysis',
    params
  })
}

/* ---------------------------------------------------------------------------------- 业务销售排行  */

export function salesmanSalesRankingApi(params) {
  return request({
    url: '/salesmanSalesRanking',
    params
  })
}

/* ---------------------------------------------------------------------------------- 业务员销售明细分析表  */

export function salesDetailAnalysisSheetForSalesmenApi(params) {
  return request({
    url: '/salesDetailAnalysisSheetForSalesmen',
    params
  })
}

/* ---------------------------------------------------------------------------------- 产品类别交易分析表  */

export function productCategoryTransactionAnalysisSheetApi(params) {
  return request({
    url: '/productCategoryTransactionAnalysisSheet',
    params
  })
}

/* ---------------------------------------------------------------------------------- 产品销售明细分析表  */

export function detailedAnalysisSheetOfProductSalesApi(params) {
  return request({
    url: '/detailedAnalysisSheetOfProductSales',
    params
  })
}

/* ---------------------------------------------------------------------------------- 产品类别销售明细分析表  */

export function productCategorySalesDetailAnalysisApi(params) {
  return request({
    url: '/productCategorySalesDetailAnalysis',
    params
  })
}

/* ---------------------------------------------------------------------------------- 供应商交易分析表  */

export function supplierTransactionAnalysiSheetApi(params) {
  return request({
    url: '/supplierTransactionAnalysiSheet',
    params
  })
}

/* ---------------------------------------------------------------------------------- 供应商类别交易分析表  */

export function supplierClassTransactionAnalysisTableApi(params) {
  return request({
    url: '/supplierClassTransactionAnalysisTable',
    params
  })
}

/* ---------------------------------------------------------------------------------- 人员报工明细表  */

export function personnelReportScheduleApi(params) {
  return request({
    url: '/personnelReportSchedule',
    params
  })
}

/* ---------------------------------------------------------------------------------- 机台报工明细表  */

export function machineReportScheduleApi(params) {
  return request({
    url: '/machineReportSchedule',
    params
  })
}

//! ----------------------------------------------------------------------------------------------------下面是销售管理的内容

// 销售报价单
export function salesQuotation(params) {
  return request({
    url: '/salesQuotation',
    params
  })
}

export function salesQuotationsub(params) {
  return request({
    url: '/salesQuotationsub',
    params
  })
}

// 销售订单
export function salesOrder(params) {
  return request({
    url: '/salesOrder',
    params
  })
}

export function salesOrdersub(params) {
  return request({
    url: '/salesOrdersub',
    params
  })
}

// 销售出库单
export function salesReleaseSheet(params) {
  return request({
    url: '/salesReleaseSheet',
    params
  })
}

export function salesReleaseSheetsub(params) {
  return request({
    url: '/salesReleaseSheetsub',
    params
  })
}

// 销售退货单
export function salesReturnNote(params) {
  return request({
    url: '/salesReturnNote',
    params
  })
}

export function salesReturnNotesub(params) {
  return request({
    url: '/salesReturnNotesub',
    params
  })
}

// 报价明细表
export function quotationList(params) {
  return request({
    url: '/quotationList',
    params
  })
}

// 销售订单明细表
export function salesOrderSheet(params) {
  return request({
    url: '/salesOrderSheet',
    params
  })
}

// 销售交期达成率
export function salesDeliveryRate(params) {
  return request({
    url: '/salesDeliveryRate',
    params
  })
}

// 销售交易明细表
export function statementOfSalesTransactions(params) {
  return request({
    url: '/statementOfSalesTransactions',
    params
  })
}

// 客户交易汇总表
export function summaryOfCustomerTransactions(params) {
  return request({
    url: '/summaryOfCustomerTransactions',
    params
  })
}

// 业务销售交易汇总表
export function summaryOfBusinessSalesTransactions(params) {
  return request({
    url: '/summaryOfBusinessSalesTransactions',
    params
  })
}

/* ---------------------------------------------------------------------------------- 销售未出货  */

export function unshippedSales(params) {
  return request({
    url: '/unshippedSales',
    params
  })
}

/* ---------------------------------------------------------------------------------- 销售收入明细表  */

export function SaleOrderProceeds(params) {
  return request({
    url: '/SaleOrderProceeds',
    params
  })
}

export function SaleOrdercost(params) {
  return request({
    url: '/SaleOrdercost',
    params
  })
}

/* ---------------------------------------------------------------------------------- 客户资料  */

export function comcustomer(params) {
  return request({
    url: '/comcustomer',
    params
  })
}

/* ---------------------------------------------------------------------------------- 销售未出货进度  */

export function unshippedSalesChedule(params) {
  return request({
    url: '/unshippedSalesChedule',
    params
  })
}

/* ---------------------------------------------------------------------------------- 工序进度排序  */

export function scheduleOrderMax(params) {
  return request({
    url: '/scheduleOrderMax',
    params
  })
}

/* ---------------------------------------------------------------------------------- 阶段进度排序最后一道加工顺序  */

export function scheduleOrder(params) {
  return request({
    url: '/scheduleOrder',
    params
  })
}
/* ---------------------------------------------------------------------------------- 修改之前的阶段  */
export function zqgx(params) {
  return request({
    url: '/zqgx',
    params
  })
}
/* ---------------------------------------------------------------------------------- 下一步阶段  */
export function scheduleOrderXyb(params) {
  return request({
    url: '/scheduleOrderXyb',
    params
  })
}
/* ---------------------------------------------------------------------------------- 当前阶段  */
export function gxsx(params) {
  return request({
    url: '/gxsx',
    params
  })
}
/* ---------------------------------------------------------------------------------- 当前阶段进度修改  */
export function scheduleAdd(params) {
  return request({
    url: '/scheduleAdd',
    params
  })
}

/* ---------------------------------------------------------------------------------- 当前阶段进度修改  */
export function unshippedsalesub(params) {
  return request({
    url: '/unshippedsalesub',
    params
  })
}

/*--------------------------------------------------------------------------仓库 */
export function unshippedSalesCheck(params) {
  return request({
    url: '/unshippedSalesCheck',
    params
  })
}

/*--------------------------------------------------------------------------包装 */
export function unshippedSalesChebz(params) {
  return request({
    url: '/unshippedSalesChebz',
    params
  })
}
/*--------------------------------------------------------------------------记录 */
export function unshippedSalesChekb(params) {
  return request({
    url: '/unshippedSalesChekb',
    params
  })
}

/* ---------------------------------------------------------------------------------- 销售报价单审核，取消审核  */
export function salesQuotationHasCheck(params) {
  return request({
    url: '/salesQuotationHasCheck',
    params
  })
}

/* ---------------------------------------------------------------------------------- 创建销售进度表 */
export function createSellProgressTable() {
  return request({
    url: '/sellTableinfo'
  })
}

/*--------------------------------------------------------------------------业务 */
export function unshippedSalesCheyw(params) {
  return request({
    url: '/unshippedSalesCheyw',
    params
  })
}

/**
 * @description: 获取销售进度表信息
 * @param {*} params
 * @return {*}
 */
export function getsaleprogresstable(params) {
  return request({
    url: '/getsaleprogresstable',
    params
  })
}

/**
 * @description: 获取销售进度表表身信息
 * @param {*} params
 * @return {*}
 */
export function getsaleprogresstableSub(params) {
  return request({
    url: '/getsaleprogresstablesub',
    params
  })
}

/**
 * @description: 初始化人员销售计划表
 * @param {*} params
 * @return {*}
 */
export function personsalesplan_info(params) {
  return request({
    url: '/personsalesplan_info',
    params
  })
}

/**
 * @description: 获取销售计划表信息
 * @param {*} params
 * @return {*}
 */
export function getPersonsalesplan_List(params) {
  return request({
    url: '/personsalesplan_list',
    params
  })
}

/**
 * @description: 新增人员销售计划
 * @param {*} data
 * @return {*}
 */
export function personsalesplan_add(data) {
  return request({
    url: '/personsalesplan_add',
    data,
    method: 'post'
  })
}

/**
 * @description: 获取表头信息
 * @return {*}
 */
export function personsalesplan_Main(params) {
  return request({
    url: '/personsalesplan_main',
    params
  })
}

/**
 * @description: 获取表身信息
 * @return {*}
 */
export function personsalesplan_Sub(params) {
  return request({
    url: '/personsalesplan_sub',
    params
  })
}

/**
 * @description: 二级表头追加数据
 * @return {*}
 */
export function personsalesplan_Main_push(data) {
  return request({
    url: '/personsalesplan_push',
    data,
    method: 'post'
  })
}

/**
 * @description: 更新表身数据
 * @param {*} data
 * @return {*}
 */
export function personsalesplan_Sub_Update(data) {
  return request({
    url: '/personsalesplan_sub_update',
    data,
    method: 'post'
  })
}

/**
 * @description: 删除表头、表身数据
 * @return {*}
 */
export function personsalesplan_main_delete(data) {
  return request({
    url: '/personsalesplan_main_delete',
    data,
    method: 'post'
  })
}

/**
 * @description: 删除单据
 * @return {*}
 */
export function personsalesplan_delete(data) {
  return request({
    url: '/personsalesplan_delete',
    data,
    method: 'post'
  })
}

/**
 * @description: 删除表身
 * @return {*}
 */
export function personsalesplan_sub_delete(data) {
  return request({
    url: '/personsalesplan_sub_delete',
    data,
    method: 'post'
  })
}

/**
 * @description: 获取根据人员编号获取客户信息
 * @param {*} params
 * @return {*}
 */
export function personsalesplan_customer(params) {
  return request({
    url: '/personsalesplan_customer',
    params
  })
}

/**
 * @description: 获取根据人员编号获取已添加的客户编号
 * @param {*} params
 * @return {*}
 */
export function personsalesplan_customerID(params) {
  return request({
    url: '/personsalesplan_customerid',
    params
  })
}

/**
 * @description: 子表添加客户
 * @return {*}
 */
export function personsalesplan_Sub_Push(data) {
  return request({
    url: '/personsalesplan_sub_push',
    data,
    method: 'post'
  })
}

/**
 * @description: 初始化
 * @return {*}
 */
export function salesplan_info() {
  return request({
    url: '/salesplan_info'
  })
}

/**
 * @description: 人员销售计划表
 * @param {*} params
 * @return {*}
 */
export function salesplan(params) {
  return request({
    url: '/salesplan',
    params
  })
}

/**
 * @description: 新增
 * @param {*} data
 * @return {*}
 */
export function salesPlan_Add(data) {
  return request({
    url: '/salesplan_add',
    method: 'post',
    data
  })
}

/**
 * @description: 获取表身数据
 * @param {*} params
 * @return {*}
 */
export function salesplan_sub(params) {
  return request({
    url: '/salesplan_sub',
    params
  })
}

/**
 * @description: 数据更新
 * @param {*} data
 * @return {*}
 */
export function salesplan_update(data) {
  return request({
    url: '/salesplan_update',
    method: 'post',
    data
  })
}

/**
 * @description: 删除单据
 * @param {*} data
 * @return {*}
 */
export function salesplan_delete(data) {
  return request({
    url: '/salesplan_delete',
    method: 'post',
    data
  })
}

// 销售出库产品月份总金额
export function xsckcpyf(params) {
  return request({
    url: '/xsckcpyf',
    params
  })
}

// 销售出库业务员月份总金额
export function xsckywyyf(params) {
  return request({
    url: '/xsckywyyf',
    params
  })
}

// 销售出库客户月份总金额
export function xsckkhyf(params) {
  return request({
    url: '/xsckkhyf',
    params
  })
}

// 仓库设定查询
export function cksdcx(params) {
  return request({
    url: '/cksdcx',
    params
  })
}

// 仓库设定查询新增
export function cksdxz(data) {
  return request({
    url: '/cksdxz',
    method: 'post',
    data
  })
}

// 仓库设定查询修改
export function cksdxg(data) {
  return request({
    url: '/cksdxg',
    method: 'patch',
    data
  })
}

// 仓库设定查询删除
export function cksdsc(params) {
  return request({
    url: '/cksdsc',
    method: 'delete',
    params
  })
}

/**
 * @description: 获取销售出库计划
 * @param {*} params
 * @return {*}
 */
export function getOutWarePlan(params) {
  return request({
    url: '/outWarePlan',
    params
  })
}

/**
 * @description: 获取业绩统计记录
 * @param {*} params
 * @return {*}
 */
export function getYjtjList(params) {
  return request({
    url: '/yjtj/list',
    params
  })
}

/**
 * @description: 获取子件用途分析数据
 * @param {*} params
 * @return {*}
 */
export function getAnalysissubcomponentApi(params) {
  return request({
    url: '/Analysissubcomponent',
    params
  })
}

/**
 * @description: 获取产品用途分析
 * @param {*} params
 * @return {*}
 */
export function getProductUsageAnalysisApi(params) {
  return request({
    url: '/ProductUsageAnalysis',
    params
  })
}
